//
//  UILabel+Extension.swift
//  sinaBlog
//
//  Created by tianxiangyang on 15/12/16.
//  Copyright (c) 2015年 itcast. All rights reserved.
//

import UIKit

extension UILabel {

    convenience init(title:String,text_Color:UIColor,fontSize:CGFloat,maxWidth:CGFloat = 0){
    //实例化自己
        self.init()
        numberOfLines = 0
        
        textAlignment = NSTextAlignment.Center
        
        text = title
        
        font = UIFont.systemFontOfSize(fontSize)
        
        if maxWidth > 0 {
        
        textAlignment = NSTextAlignment.Left
            
        preferredMaxLayoutWidth = maxWidth
        }
        
        textColor = text_Color
 
        
    }





}

